package com.org.gsc.zsqdemos.uis;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;

/**
 * Created by qundui on 2017/6/18.
 */
// 魔法指示器各种样式
public class MagicindicatorMTestDemo extends ListActivity implements AdapterView.OnItemClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String[] mdatas={"ScrollableTabDemo","FixTabDemo"};
        getListView().setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,android.R.id.text1,mdatas));
        getListView().setOnItemClickListener(this);
    }
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        switch (position){
            case 0:
                startActivity(new Intent(this,ScrollableTabDemo.class));
                break;
            case 1:
                startActivity(new Intent(this,FixTabDemo.class));
                break;
            default:
                break;
        }
    }
}
